<?php if (!defined('THINK_PATH')) exit();?><style>    
    #testFileInput2{
        height: 30px; width: 102px; margin-left: 128px;
    }
    #preview1, #topPhpto
        {  
            width:150px;  
            padding-left: 65px;padding-top: 15px; border-top-width: 5px;
            //height:150px;  
        }
</style>
<div class="pageContent">	
    <form method="post" action="/ft_system/Admin/Notice/edit?callbackType=closeCurrent" enctype="multipart/form-data" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
        <input type="hidden"  id='hidden'  name='id' value="<?php echo ($vo["id"]); ?>"/>
        <input type="hidden"  id='hidden'  name='user_id' value="<?php echo (session('authId')); ?>"/>
        <div class="pageFormContent" layoutH="58">
            <div class="unit">
                <label>标题：</label>
                <input type="text" name="title" size="45"  value="<?php echo ($vo["title"]); ?>" class='required' />
            </div>
            <div class="unit">
                <label>英文标题：</label>
                <input type="text" name="en_title" size="45"  value="<?php echo ($vo["en_title"]); ?>" class='required' />
            </div>
            <?php if(($vo['id'] != '') or ($vo['id'] != null)): ?><div class="unit">                    
                    <label>发表人</label>
                    <input type="text" name="user_id" value="<?php echo (getUsername($vo["user_id"])); ?>" disabled/>  
                </div><?php endif; ?>
            <div class="unit">
                <label>类型：</label>
                <select class="" name="sign" id='sign' style="width: 101px;">
                    <option value="1" <?php if($vo['sign'] == '1'): ?>selected<?php endif; ?>>公告</option>
                    <option value="2" <?php if($vo['sign'] == '2'): ?>selected<?php endif; ?>>公司新闻</option>
                    <option value="3" <?php if($vo['sign'] == '3'): ?>selected<?php endif; ?>>外部新闻</option>
                </select>
            </div>            
            <div class="unit">
                <label>部门：</label>
                <select class="" name="section_id" id='section' style="width: 101px;" <?php if($vo['sign'] == 2): ?>disabled<?php endif; ?>>
                    <?php if(is_array($list)): foreach($list as $key=>$section): ?><option value="<?php echo ($section['id']); ?>" <?php if($section['id'] == $vo['section_id']): ?>selected<?php endif; ?>><?php echo ($section["name"]); ?></option><?php endforeach; endif; ?>
                </select>
            </div>
            <div class="unit" id='control'>
                <label>内容：</label>
               <textarea class="editor" name="content" rows="15" cols="70"
                    upLinkUrl   ="<?php echo (DWZ_URL); ?>xheditor/upload.php" upLinkExt="zip,rar,txt" 
                    upImgUrl    ="<?php echo (DWZ_URL); ?>xheditor/upload.php" upImgExt="jpg,jpeg,gif,png" 
                    upFlashUrl  ="<?php echo (DWZ_URL); ?>xheditor/upload.php" upFlashExt="swf"
                    upMediaUrl  ="<?php echo (DWZ_URL); ?>xheditor/upload.php" upMediaExt="mp4,mov,rmvb,flv">
                    <?php echo ($vo["content"]); ?>
                </textarea>
            </div>
            <div class="unit" id='control'>
                <label>英文内容：</label>
                <textarea class="editor" name="en_content" rows="15" cols="70"
                    upLinkUrl   ="<?php echo (DWZ_URL); ?>xheditor/upload.php" upLinkExt="zip,rar,txt" 
                    upImgUrl    ="<?php echo (DWZ_URL); ?>xheditor/upload.php" upImgExt="jpg,jpeg,gif,png" 
                    upFlashUrl  ="<?php echo (DWZ_URL); ?>xheditor/upload.php" upFlashExt="swf"
                    upMediaUrl  ="<?php echo (DWZ_URL); ?>xheditor/upload.php" upMediaExt="flv,mp4,mov,rmvb">
                    <?php echo ($vo["en_content"]); ?>
                </textarea>
            </div>
            <?php if(($vo['id']) != ""): ?><div class="unit">
                    <label style="width: 108px;">是否置顶：</label>
                    <label style="width: 38px;"><input type="radio" name="top" value="1" />是</label>
                    <label><input type="radio" name="top" value='0' checked/>否</label> 
                </div><?php endif; ?>          
        </div>
        <div class="formBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
                <li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
            </ul>
        </div>
    </form>	
</div>
<script>
    if($("#sign").val()!=1){
        $("#section").attr('disabled','disabled');
    }
    $('#sign').change(function(){
        var sign    =$("#sign option:selected").val();
        if(sign==1){
            $("#section").attr('disabled',false);
        }else{
            $("#section").val(1);
            $("#section").attr('disabled','disabled');
        }
    }); 
</script>